#include "stdio.h"

int main() {
	int i, sum, sign;
	sum = 0, i = 1, sign = 1;
	while (i <= 17) {
		printf("%d\n", sign * i);
		sum += sign * i;
		i = i + 2;
		sign = -sign;
	}
	printf("sum=%d", sum);
}